<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>举报详情 - 社交平台</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --secondary: #6366f1;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --pending: #64748b;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-tertiary: #94a3b8;
            --bg-light: #f1f5f9;
            --bg-white: #ffffff;
            --border-light: #e2e8f0;
            --radius: 10px;
            --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 80px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
            flex: 1;
        }
        
        .nav-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 20px;
        }
        
        .nav-btn.primary {
            color: var(--primary);
        }
        
        /* 状态标签 */
        .status-badge {
            font-size: 14px;
            padding: 5px 12px;
            border-radius: 16px;
            font-weight: 500;
            display: inline-block;
            margin-bottom: 16px;
        }
        
        .status-pending {
            background-color: rgba(100, 116, 139, 0.1);
            color: var(--pending);
        }
        
        .status-handling {
            background-color: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }
        
        .status-resolved {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        .status-rejected {
            background-color: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }
        
        /* 内容容器 */
        .content-container {
            padding: 16px;
        }
        
        /* 通用区块样式 */
        .section {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: var(--shadow);
        }
        
        .section-header {
            padding: 16px;
            border-bottom: 1px solid var(--border-light);
            font-size: 16px;
            font-weight: 600;
        }
        
        .section-body {
            padding: 16px;
        }
        
        /* 举报信息 */
        .report-info {
            margin-bottom: 16px;
        }
        
        .report-meta {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;
            color: var(--text-tertiary);
            font-size: 13px;
        }
        
        .report-type {
            font-size: 16px;
            color: var(--danger);
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .report-description {
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 16px;
        }
        
        /* 图片容器 */
        .image-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 16px;
        }
        
        .report-image {
            width: calc(33.333% - 5.33px);
            height: 100px;
            border-radius: 6px;
            object-fit: cover;
            background-color: var(--bg-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-tertiary);
            overflow: hidden;
        }
        
        .report-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 被举报内容 */
        .reported-content {
            background-color: var(--bg-light);
            border-radius: var(--radius);
            padding: 16px;
            margin-bottom: 16px;
        }
        
        .content-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }
        
        .content-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 600;
        }
        
        .content-author-info {
            flex: 1;
        }
        
        .content-author {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 2px;
        }
        
        .content-time {
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        .content-text {
            font-size: 15px;
            line-height: 1.5;
            margin-bottom: 12px;
        }
        
        .content-actions {
            display: flex;
            gap: 16px;
            font-size: 13px;
            color: var(--text-secondary);
        }
        
        .content-action {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 处理进度 */
        .progress-timeline {
            position: relative;
            padding-left: 28px;
            margin-bottom: 16px;
        }
        
        .progress-timeline::before {
            content: '';
            position: absolute;
            left: 11px;
            top: 0;
            bottom: 0;
            width: 2px;
            background-color: var(--border-light);
        }
        
        .timeline-item {
            position: relative;
            padding-bottom: 20px;
        }
        
        .timeline-item:last-child {
            padding-bottom: 0;
        }
        
        .timeline-dot {
            position: absolute;
            left: -28px;
            top: 3px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background-color: var(--bg-white);
            border: 2px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .timeline-dot.active {
            background-color: var(--primary);
            border-color: var(--primary);
            color: white;
        }
        
        .timeline-content {
            background-color: var(--bg-light);
            border-radius: 8px;
            padding: 12px;
        }
        
        .timeline-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 6px;
        }
        
        .timeline-title {
            font-size: 15px;
            font-weight: 600;
        }
        
        .timeline-time {
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        .timeline-description {
            font-size: 14px;
            color: var(--text-secondary);
        }
        
        /* 留言区 */
        .messages-section {
            margin-bottom: 16px;
        }
        
        .message-list {
            padding: 0 16px 16px;
        }
        
        .message-item {
            margin-bottom: 16px;
        }
        
        .message-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .message-author {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: var(--secondary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 600;
        }
        
        .message-author-name {
            font-size: 14px;
            font-weight: 600;
        }
        
        .message-badge {
            font-size: 11px;
            padding: 1px 6px;
            border-radius: 4px;
            background-color: var(--primary);
            color: white;
        }
        
        .message-time {
            font-size: 12px;
            color: var(--text-tertiary);
            display: flex;
            align-items: flex-end;
        }
        
        .message-content {
            background-color: var(--bg-light);
            border-radius: 8px;
            padding: 12px;
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 8px;
        }
        
        .message-actions {
            display: flex;
            gap: 16px;
            padding-left: 44px;
        }
        
        .message-action {
            font-size: 12px;
            color: var(--text-tertiary);
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 回复框 */
        .reply-box {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: var(--bg-white);
            padding: 12px 16px;
            border-top: 1px solid var(--border-light);
            z-index: 900;
        }
        
        .reply-form {
            display: flex;
            gap: 10px;
        }
        
        .reply-input {
            flex: 1;
            padding: 10px 12px;
            border: 1px solid var(--border-light);
            border-radius: 20px;
            font-size: 14px;
            outline: none;
            resize: none;
            height: 40px;
            overflow-y: auto;
        }
        
        .reply-input:focus {
            border-color: var(--primary);
        }
        
        .reply-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 操作按钮组 */
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
        }
        
        .action-btn {
            flex: 1;
            padding: 10px 0;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 500;
            border: none;
            text-align: center;
        }
        
        .btn-primary {
            background-color: var(--primary);
            color: white;
        }
        
        .btn-secondary {
            background-color: var(--bg-light);
            color: var(--text-secondary);
        }
        
        .btn-danger {
            background-color: var(--danger);
            color: white;
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 6px;
            z-index: 9999;
            font-size: 14px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        /* 图片预览弹窗 */
        .image-preview-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }
        
        .image-preview-modal.active {
            display: flex;
        }
        
        .preview-image {
            max-width: 90%;
            max-height: 80%;
            object-fit: contain;
        }
        
        .close-preview {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 处理结果 */
        .resolution-result {
            border-left: 3px solid var(--success);
            padding-left: 12px;
            margin-bottom: 16px;
        }
        
        .result-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 6px;
        }
        
        .result-content {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-btn" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">举报详情</div>
        <button class="nav-btn primary" id="moreBtn">
            <i class="fas fa-ellipsis-v"></i>
        </button>
    </div>
    
    <!-- 内容容器 -->
    <div class="content-container">
        <!-- 举报状态 -->
        <span class="status-badge status-handling">处理中</span>
        
        <!-- 举报信息 -->
        <div class="section">
            <div class="section-header">举报信息</div>
            <div class="section-body">
                <div class="report-meta">
                    <span>举报编号: #R20230625008</span>
                    <span>提交时间: 2023-06-25 09:24</span>
                </div>
                <div class="report-type">
                    <i class="fas fa-exclamation-circle"></i>
                    <span>垃圾广告</span>
                </div>
                <div class="report-description">
                    该用户在多个帖子下发布相同的广告内容，包含二维码和联系方式，严重影响社区体验。我已收集了他在三个不同帖子下发布的相同内容作为证据。
                </div>
                <div class="image-container">
                    <div class="report-image">
                        <img src="https://picsum.photos/id/237/200/200" alt="举报图片1">
                    </div>
                    <div class="report-image">
                        <img src="https://picsum.photos/id/238/200/200" alt="举报图片2">
                    </div>
                    <div class="report-image">
                        <img src="https://picsum.photos/id/239/200/200" alt="举报图片3">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 被举报内容 -->
        <div class="section">
            <div class="section-header">被举报内容</div>
            <div class="section-body">
                <div class="reported-content">
                    <div class="content-header">
                        <div class="content-avatar">张</div>
                        <div class="content-author-info">
                            <div class="content-author">张明</div>
                            <div class="content-time">2023-06-24 15:30</div>
                        </div>
                    </div>
                    <div class="content-text">
                        专业办理各类证件，快速高效，价格优惠，扫码咨询详情，24小时在线服务。绝对真实有效，无效退款！
                    </div>
                    <div class="image-container">
                        <div class="report-image">
                            <img src="https://picsum.photos/id/243/200/200" alt="被举报内容图片">
                        </div>
                    </div>
                    <div class="content-actions">
                        <div class="content-action">
                            <i class="fas fa-heart"></i>
                            <span>24</span>
                        </div>
                        <div class="content-action">
                            <i class="fas fa-comment"></i>
                            <span>8</span>
                        </div>
                        <div class="content-action">
                            <i class="fas fa-share"></i>
                            <span>分享</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 处理进度 -->
        <div class="section">
            <div class="section-header">处理进度</div>
            <div class="section-body">
                <div class="progress-timeline">
                    <div class="timeline-item">
                        <div class="timeline-dot active">
                            <i class="fas fa-check" style="font-size: 12px;"></i>
                        </div>
                        <div class="timeline-content">
                            <div class="timeline-header">
                                <div class="timeline-title">举报已受理</div>
                                <div class="timeline-time">2023-06-25 09:30</div>
                            </div>
                            <div class="timeline-description">
                                您的举报已被系统接收，正在等待管理员审核
                            </div>
                        </div>
                    </div>
                    <div class="timeline-item">
                        <div class="timeline-dot active">
                            <i class="fas fa-check" style="font-size: 12px;"></i>
                        </div>
                        <div class="timeline-content">
                            <div class="timeline-header">
                                <div class="timeline-title">管理员开始审核</div>
                                <div class="timeline-time">2023-06-25 10:15</div>
                            </div>
                            <div class="timeline-description">
                                管理员已开始审核您的举报内容和相关证据
                            </div>
                        </div>
                    </div>
                    <div class="timeline-item">
                        <div class="timeline-dot">
                            <!-- 未完成状态为空 -->
                        </div>
                        <div class="timeline-content">
                            <div class="timeline-header">
                                <div class="timeline-title">处理完成</div>
                                <div class="timeline-time">待处理</div>
                            </div>
                            <div class="timeline-description">
                                管理员将对被举报内容做出相应处理
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 处理操作区 -->
        <div class="action-buttons">
            <button class="action-btn btn-secondary" id="cancelBtn">取消举报</button>
            <button class="action-btn btn-primary" id="updateBtn">补充证据</button>
        </div>
        
        <!-- 留言回复区 -->
        <div class="section messages-section">
            <div class="section-header">沟通记录</div>
            <div class="message-list">
                <div class="message-item">
                    <div class="message-header">
                        <div class="message-author">
                            <div class="message-avatar">管</div>
                            <div>
                                <div class="message-author-name">
                                    社区管理员 <span class="message-badge">官方</span>
                                </div>
                            </div>
                        </div>
                        <div class="message-time">2023-06-25 10:30</div>
                    </div>
                    <div class="message-content">
                        您好，我们已收到您的举报。经初步查看，该用户确实存在多次发布相同内容的行为。我们会进一步核实，如果确认是垃圾广告，将按照社区规定进行处理。感谢您对社区环境的维护！
                    </div>
                    <div class="message-actions">
                        <div class="message-action">
                            <i class="fas fa-reply"></i>
                            <span>回复</span>
                        </div>
                    </div>
                </div>
                
                <div class="message-item">
                    <div class="message-header">
                        <div class="message-author">
                            <div class="message-avatar">我</div>
                            <div class="message-author-name">我</div>
                        </div>
                        <div class="message-time">2023-06-25 11:05</div>
                    </div>
                    <div class="message-content">
                        您好，除了我提供的证据外，该用户还在其他几个帖子下发布了相同内容，我可以继续收集更多证据提交吗？
                    </div>
                    <div class="message-actions">
                        <div class="message-action">
                            <i class="fas fa-edit"></i>
                            <span>编辑</span>
                        </div>
                        <div class="message-action">
                            <i class="fas fa-trash"></i>
                            <span>删除</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 回复框 -->
    <div class="reply-box">
        <form class="reply-form">
            <textarea class="reply-input" placeholder="添加留言或回复..." id="replyInput"></textarea>
            <button type="button" class="reply-btn" id="sendReplyBtn">
                <i class="fas fa-paper-plane"></i>
            </button>
        </form>
    </div>
    
    <!-- 图片预览弹窗 -->
    <div class="image-preview-modal" id="imagePreviewModal">
        <img src="" alt="图片预览" class="preview-image" id="previewImage">
        <button class="close-preview" id="closePreview">
            <i class="fas fa-times"></i>
        </button>
    </div>
    
    <!-- 提示消息 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // DOM元素
        const backBtn = document.getElementById('backBtn');
        const moreBtn = document.getElementById('moreBtn');
        const cancelBtn = document.getElementById('cancelBtn');
        const updateBtn = document.getElementById('updateBtn');
        const sendReplyBtn = document.getElementById('sendReplyBtn');
        const replyInput = document.getElementById('replyInput');
        const reportImages = document.querySelectorAll('.report-image img');
        const imagePreviewModal = document.getElementById('imagePreviewModal');
        const previewImage = document.getElementById('previewImage');
        const closePreview = document.getElementById('closePreview');
        const toast = document.getElementById('toast');
        const messageActions = document.querySelectorAll('.message-action');
        
        // 显示提示消息
        function showToast(message) {
            toast.textContent = message;
            toast.classList.add('show');
            
            clearTimeout(toast.timeout);
            toast.timeout = setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
        
        // 打开图片预览
        function openImagePreview(src) {
            previewImage.src = src;
            imagePreviewModal.classList.add('active');
            document.body.style.overflow = 'hidden';
        }
        
        // 关闭图片预览
        function closeImagePreview() {
            imagePreviewModal.classList.remove('active');
            document.body.style.overflow = 'auto';
        }
        
        // 发送回复
        function sendReply() {
            const content = replyInput.value.trim();
            if (!content) {
                showToast('请输入内容');
                return;
            }
            
            // 这里只是模拟发送，实际项目中会发送到服务器
            showToast('回复已发送');
            replyInput.value = '';
            
            // 自动调整输入框高度
            adjustReplyHeight();
        }
        
        // 调整回复框高度
        function adjustReplyHeight() {
            replyInput.style.height = 'auto';
            const scrollHeight = replyInput.scrollHeight;
            // 限制最大高度为100px
            if (scrollHeight > 100) {
                replyInput.style.height = '100px';
            } else {
                replyInput.style.height = scrollHeight + 'px';
            }
        }
        
        // 绑定事件
        function bindEvents() {
            // 返回按钮
            backBtn.addEventListener('click', () => {
                history.back();
                showToast('返回上一页');
            });
            
            // 更多选项按钮
            moreBtn.addEventListener('click', () => {
                showToast('更多操作选项');
            });
            
            // 取消举报按钮
            cancelBtn.addEventListener('click', () => {
                if (confirm('确定要取消举报吗？')) {
                    showToast('举报已取消');
                    setTimeout(() => {
                        history.back();
                    }, 1000);
                }
            });
            
            // 补充证据按钮
            updateBtn.addEventListener('click', () => {
                showToast('进入补充证据页面');
            });
            
            // 发送回复按钮
            sendReplyBtn.addEventListener('click', sendReply);
            
            // 回复框输入事件
            replyInput.addEventListener('input', adjustReplyHeight);
            
            // 回车发送回复
            replyInput.addEventListener('keydown', (e) => {
                if (e.key === 'Enter' && !e.shiftKey) {
                    e.preventDefault();
                    sendReply();
                }
            });
            
            // 图片点击预览
            reportImages.forEach(img => {
                img.addEventListener('click', function() {
                    openImagePreview(this.src);
                });
            });
            
            // 关闭图片预览
            closePreview.addEventListener('click', closeImagePreview);
            
            // 点击预览背景关闭
            imagePreviewModal.addEventListener('click', function(e) {
                if (e.target === this) {
                    closeImagePreview();
                }
            });
            
            // 消息操作按钮
            messageActions.forEach(action => {
                action.addEventListener('click', function() {
                    const actionText = this.querySelector('span').textContent;
                    showToast(`${actionText}成功`);
                });
            });
        }
        
        // 初始化
        function init() {
            bindEvents();
            adjustReplyHeight();
        }
        
        // 启动
        init();
    </script>
</body>
</html>
